import * as mongoose from 'mongoose';
import db from '../lib/db/mongodb';

//门店信息Model-----保存导入的门店的数据信息
let StoreInfoSchema: mongoose.Schema = new mongoose.Schema({
    sourceId: String,
    storeCode:String,//门店编码
    storeName:String,//门店名称
    
    store_classification:String,//门店类型
    channel:String,//门店渠道

    contact_name:String,//联系人姓名
    phone:String,//电话
    consumerCode:String,//客户编码
    consumerName:String,//客户名称

    city:String,//门店所在城市名称
    cityType:String,//城市等级

    store_address:String,//门店地址
    iT_Mall_name:String,//IT Mall name  暂时没用
    iT_Mall_address:String,//IT Mall address  暂时没用
    date:String

}, { collection: 'storeInfo' });
export interface StoreInfo extends mongoose.Document {
    sourceId: string;
    storeCode:string,//门店编码
    storeName:string,//门店名称
    channel:string,//渠道
    store_classification:string,//门店类型
  
    contact_name:string,//联系人姓名
    phone:string,//电话
    consumerCode:string,//客户编码
    consumerName:string,//客户名称
    city:string,//门店所在城市名称
    cityType:string;//城市等级
    store_address:string,//门店地址
    iT_Mall_name:string,//IT Mall name
    iT_Mall_address:string,//IT Mall address
    date:string
}
let storeInfoModel = db.model<StoreInfo>('storeInfo', StoreInfoSchema);
export default storeInfoModel;
